package com.example.flshtarvel.entity;

import java.util.Date;

public class User {
    private String userId; //用户id
    private String userName; //用户名
    private String password;//密码
    private int role;//角色（0：普通用户，1：管理员）
    private String time; //注册时间

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setRole(int role) {
        this.role = role;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getUserId() {
        return userId;
    }

    public String getUserName() {
        return userName;
    }

    public String getPassword() {
        return password;
    }

    public int getRole() {
        return role;
    }

    public String getTime() {
        return time;
    }

    @Override
    public boolean equals(Object obj){
        System.out.println("user");
        User user = (User) obj;
        if(user.getUserId().equals(userId)){
            return true;
        }else{
            return false;
        }

    }
}
